﻿//-------------------------------------------------------------------------------------------
// <copyright file="DoubleExtensions.cs" company="Russell Wilkins">
//     Copyright (c) Russell Wilkins 2014. All Rights Reserved.
// </copyright>
// <author>Russell Wilkins</author>
// <license href="license.txt">
//     The use of this software is governed by the Microsoft Public License
//     which is included with this distribution.
// </license>
//-------------------------------------------------------------------------------------------
namespace Ripple.Helpers
{
    using System;

    public static class DoubleExtensions
    {
        public static DateTime ToDateTime(this double unixTime)
        {
            return (new DateTime(2000, 1, 1, 0, 0, 0, 0)).AddSeconds(unixTime).ToLocalTime();
        }
    }
}